/*
* ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
* Without permission, no one has the right to obtain, disclose or use this software in any way.
*/

package ecarx.xsf.notificationcenter.model;


import ecarx.xsf.notificationcenter.notification.INotificationBar;


public class Competition implements Comparable<Competition> {

    /**
     * 通知进入队列的时间
     */
    private long createTime;

    /**
     * 通知消息
     */
    private INotificationBar notificationBar;

    public Competition(){}

    public Competition(long createTime, INotificationBar notificationBar) {
        this.createTime = createTime;
        this.notificationBar = notificationBar;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long inTime) {
        this.createTime = inTime;
    }

    public INotificationBar getNotificationBar() {
        return notificationBar;
    }

    public void setNotificationBar(INotificationBar notificationBar) {
        this.notificationBar = notificationBar;
    }

    @Override
    public int compareTo(Competition o) {
        if (createTime < o.createTime) {
            return 1;
        } else if (createTime > o.createTime) {
            return -1;
        }
        return 0;
    }
}
